home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNADN2.IN_ / oemnadn2.inf
INI File  |  1996-07-12  |  31KB  |  797 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     ISA
  5.     EISA
  6.     PCMCIA
  7.     "Jazz-Internal Bus"
  8. [Options]
  9.     NE2000
  10.     NE2000SOCKETEA
  11. [FileConstants]
  12. UtilityInf      = "UTILITY.INF"
  13. ParamInf        = "NCPARAM.INF"
  14. subroutineinf   = "SUBROUTN.INF"
  15. SoftwareType    = "driver"
  16. Exit_Code       = 0
  17. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  18. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  19. Manufacturer    = "Microsoft"
  20. ProductMajorVersion     = "4"
  21. ProductMinorVersion     = "0"
  22. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  23. ProductSoftwareName     = "NE2000"
  24. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\ne2000.sys"
  25. NetRuleSoftwareType     = "ne2000Sys ndisDriver ne2000Driver"
  26. NetRuleSoftwareUse      = $(SoftwareType)
  27. NetRuleSoftwareBindForm = """Ne2000Sys"" yes no container"
  28. NetRuleSoftwareClass    = {"ne2000Driver basic"}
  29. NetRuleSoftwareBindable = {"ne2000Driver ne2000Adapter non exclusive 100"} 
  30. ProductHardwareName     = "NE2000"
  31. NetRuleHardwareType     = "ne2000 ne2000Adapter"
  32. NetRuleHardwareBindForm = " yes yes container"
  33. NetRuleHardwareClass    = {"ne2000Adapter basic"}
  34. ProductOpSupport     = 134 
  35. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  36. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  37. [GeneralConstants]
  38. from      = ""
  39. to        = ""
  40. ExitCodeOk     = 0
  41. ExitCodeCancel = 1
  42. ExitCodeFatal  = 2
  43. KeyNull         = ""
  44. MAXIMUM_ALLOWED   = 33554432
  45. RegistryErrorIndex = NO_ERROR
  46. KeyProduct      = ""
  47. KeyParameters   = ""
  48. TRUE            = 1
  49. FALSE           = 0
  50. NoTitle            = 0
  51. ExitState   = "Active"
  52. OldVersionExisted = $(FALSE)
  53. DriverPath      = $(!STF_NTPATH)\drivers
  54. [date]
  55.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  56. [Identify]
  57.     read-syms Identification
  58.     set Status     = STATUS_SUCCESSFUL
  59.     set Identifier = $(OptionType)
  60.     set Media      = #("Source Media Descriptions", 1, 1)
  61.     Return $(Status) $(Identifier) $(Media)
  62. [ReturnOptions]
  63.     set Status        = STATUS_FAILED
  64.     set OptionList     = {}
  65.     set OptionTextList = {}
  66.     set LanguageList = ^(LanguagesSupported, 1)
  67.     Ifcontains(i) $($0) in $(LanguageList)
  68.         ifstr(i) $($1) == ""
  69.            goto returnoptions
  70.         endif
  71.         set PlatformList = ^(PlatformsSupported, 1)
  72.         Ifcontains(i) $($1) in $(PlatformList)
  73.            goto returnoptions
  74.         else
  75.            set Status = STATUS_NOTSUPPORTED
  76.            goto finish_ReturnOptions
  77.         endif
  78.     else
  79.         set Status = STATUS_NOLANGUAGE
  80.         goto finish_ReturnOptions
  81.     endif
  82. returnoptions = +
  83.     set OptionList     = ^(Options, 1)
  84.     set OptionTextList = ^(OptionsText$($0), 1)
  85.     set Status         = STATUS_SUCCESSFUL
  86. finish_ReturnOptions = +
  87.     Return $(Status) $(OptionList) $(OptionTextList)
  88. [InstallOption]
  89.     set Option   = $($1)
  90.     set SrcDir   = $($2)
  91.     set AddCopy  = $($3)
  92.     set DoCopy   = $($4)
  93.     set DoConfig = $($5)
  94.     set LanguageList = ^(LanguagesSupported, 1)
  95.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  96.         Return STATUS_NOLANGUAGE
  97.     endif
  98.     set-subst LF = "\n"
  99.     read-syms GeneralConstants
  100.     read-syms FileConstants
  101.     read-syms DialogConstants$(!STF_LANGUAGE)
  102.     ifstr(i) $(!NTN_Origination) == "NCPA"
  103.         set Continue = $(OK)
  104.     endif
  105.     read-syms FileConstants$(!STF_LANGUAGE)
  106.     detect date
  107.     set-title  $(FunctionTitle$(Option))
  108.     set to   = Begin
  109.     set from = Begin
  110.     set CommonStatus = STATUS_SUCCESSFUL
  111.     EndWait
  112. Begin = +
  113.     set ActivateDetection = FALSE
  114.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  115.                 set StartLabel = removeadapter
  116.         else-Ifstr(i) $(!NTN_InstallMode) == Update
  117.                         set StartLabel = UpgradeSoftware
  118.         else-Ifstr(i) $(!NTN_InstallMode) == bind
  119.                 set StartLabel = bindingadapter
  120.         else-Ifstr(i) $(!NTN_InstallMode) == configure
  121.                 set CommonStatus = STATUS_REBOOT
  122.                 set ActivateDetection = TRUE
  123.                 set StartLabel = configureadapter
  124.                 Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  125.                         Debug-Output "Cannot configure the Novell 2000 driver software."
  126.                         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  127.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  128.                                 Debug-Output "ShellCode error: cannot get an error string."
  129.                                 goto ShellCodeError
  130.                         endif
  131.                         set Error = $($R0)
  132.                         set from = end
  133.                         set to = end
  134.                         goto nonfatalinfo
  135.                 endif
  136.     else
  137.                 set StartLabel = installadapter
  138.                 set OEM_ABANDON_OPTIONS = {}
  139.                 set OEM_ABANDON_SOFTWARE = FALSE
  140.                 set OEM_ABANDON_ON = TRUE
  141.                 set ActivateDetection = TRUE
  142.     endif
  143.     Debug-Output "OEMNADN2.INF: =================================================="
  144.     Debug-Output "OEMNADN2.INF: STF_CWDIR is: "$(!STF_CWDIR)
  145.     Debug-Output "OEMNADN2.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  146.     Debug-Output "OEMNADN2.INF: Option is: "$(Option)
  147.     Debug-Output "OEMNADN2.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  148.     Debug-Output "OEMNADN2.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  149.     Debug-Output "OEMNADN2.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  150.     Debug-Output "OEMNADN2.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  151.     Debug-Output "OEMNADN2.INF: =================================================="
  152.     Set DetectedCard = FALSE
  153.     set PCMCIA = 0
  154.     set CardType = 0
  155.     Ifstr(i) $(ActivateDetection) != TRUE
  156.         Goto skipdetection
  157.     Endif
  158.     Set TypeList = {{IRQ,IRQList,IRQValue},+
  159.                     {PCMCIA, PCMCIAList, PCMCIA},+
  160.                     {IOADDR, IOBaseAddrDecList, IOBaseAddrValue}}
  161.     Debug-Output "OEMNADN2.INF: Calling Param_BuildTypeLists"
  162.     Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  163.     Set Status = $($R0)
  164.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  165.         Goto fataldetect
  166.     Endif
  167.     Debug-Output "OEMNADN2.INF: Calling Param_SetDefaults"
  168.     Shell $(ParamInf) Param_SetDefaults {}
  169.     Shell $(ParamInf) HexListFromDecList $(IOBaseAddrDecList)
  170.     Set IOBaseAddrHexList = $($R0)
  171.     Shell $(UtilityInf) SortList $(IRQList) TRUE FALSE
  172.     Set IRQList = $($R0)
  173.     Ifstr(i) $(!STF_NCDETECT) == YES
  174.         Ifstr(i) $(!STF_NCOPTION) == $(Option)
  175.            Set DetectedCard = TRUE
  176.            Debug-Output "OEMNADN2.INF: Setting DetectedCard to TRUE"
  177.         Endif
  178.     Endif
  179. skipdetection =+
  180.     set from = $(fatal)
  181.     set to = $(fatal)
  182.     goto $(StartLabel)
  183. installadapter = +
  184.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  185.     Ifstr $(KeyProduct) != $(KeyNull)
  186.         CloseRegKey $(KeyProduct)
  187.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  188.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftware$(Option)Title),+
  189.                $(ProductVersion)
  190.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  191.                Debug-Output "ShellCode error: cannot get an error string."
  192.                goto ShellCodeError
  193.            endif
  194.            goto end
  195.         else
  196.            Shell $(UtilityInf), CardExistedDlg
  197.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  198.                Debug-Output "ShellCode error: cannot get an error string."
  199.                goto ShellCodeError
  200.            endif
  201.            ifstr(i) $($R1) != "OK"
  202.                set CommonStatus = STATUS_USERCANCEL
  203.                goto end
  204.            endif
  205.            set OldVersionExisted = $(TRUE)
  206.         endif
  207.     endif
  208.     Ifstr(i) $(DetectedCard) != TRUE
  209.         Goto adaptersetup
  210.     Endif
  211.     StartWait
  212.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  213.     EndWait
  214.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  215.         Goto adaptersetup
  216.     Endif
  217.     Set DetectedParams = $($R1)
  218.     Debug-Output "OEMNADN2.INF: Calling Param_SetDefaults to merge detected params"
  219.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  220.     goto adaptersetup
  221. configureadapter = +
  222.     Ifstr $(KeyProduct) == $(KeyNull)
  223.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  224.         Ifstr $(KeyProduct) == $(KeyNull)
  225.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  226.             Debug-Output "Cannot find component product key"
  227.             goto fatalregistry
  228.         Endif
  229.     Endif
  230.     Debug-Output "INF: Shelling to FindService"
  231.     Shell $(UtilityInf) FindService, $(KeyProduct)
  232.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  233.         Debug-Output "INF: FindService shell failure"
  234.         Goto ShellCodeError
  235.     Endif
  236.     Ifstr(i) $($R0) != NO_ERROR
  237.         Debug-Output "INF: FindService Shell error: "$($R0)
  238.         Goto fatalregistry
  239.     endif
  240.     set KeyParameters = $($R2)
  241.     CloseRegKey $($R1)
  242.     Ifstr $(KeyParameters) == $(KeyNull)
  243.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  244.         Debug-Output "Cannot find component service"
  245.         goto fatalregistry
  246.     endif
  247.     set OldVersionExisted = $(TRUE)
  248.     set ValueName = ""
  249.     set ValueData = ""
  250.     set ValueStr  = ""
  251.     set ValueList = {}
  252.     EnumRegValue $(KeyParameters) ValueList
  253.     ForListDo $(ValueList)
  254.         set ValueItem = $($)
  255.         set ValueName = *($(ValueItem),1)
  256.         set ValueData = *($(ValueItem),4)
  257.         Ifstr(i) $(ValueName) == "InterruptNumber"
  258.             set IRQValue = $(ValueData)
  259.         else-ifstr(i) $(ValueName) == "IoBaseAddress"
  260.             set IOBaseAddrValue = $(ValueData)
  261.         else-ifstr(i) $(ValueName) == "BusType"
  262.             set BusInterfaceType = $(ValueData)
  263.         else-ifstr(i) $(ValueName) == "PCMCIA"
  264.             set PCMCIA = $(ValueData)
  265.         else-ifstr(i) $(ValueName) == "BusNumber"
  266.             set BusNumber = $(ValueData)
  267.         endif
  268.     EndForListDo
  269.     ifstr(i) $(IRQValue) == ""
  270.         set IRQValue = *($(IRQList), 2)
  271.     endif
  272.     ifstr(i) $(IOBaseAddrValue) == ""
  273.         set IOBaseAddrValue = *($(IOBaseAddrDecList), 1)
  274.     endif
  275. adaptersetup =+
  276.     Shell $(ParamInf) Param_ParameterConfidence
  277.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  278.         Debug-Output "OEMNADE2.INF: parameter confidence too low to bypass configuration"
  279.         Goto adapteroptions
  280.     Endif
  281.     Ifstr(i) $(DetectedCard) == TRUE
  282.         Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  283.             set BusInterfaceType = *($(!STF_NCDETINFO),5)
  284.             set BusNumber = *($(!STF_NCDETINFO),6)
  285.             Goto adapterverify
  286.         Endif
  287.     Endif
  288.     goto adapteroptions
  289. adapteroptions = +
  290.     set from = adapteroptions
  291.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  292.         ifstr(i) $(!AutoNetInterfaceType) != ""
  293.             set BusInterfaceType = $(!AutoNetInterfaceType)
  294.         else
  295.             set BusInterfaceType = 1    
  296.         endif
  297.         ifstr(i) $(!AutoNetBusNumber) != ""
  298.             set BusNumber = $(!AutoNetBusNumber)
  299.         else
  300.             set BusNumber = 0
  301.         endif
  302.         goto adapterverify
  303.     endif
  304.     set IOBaseAddress = *($(IOBaseAddrHexList), ~($(IOBaseAddrDecList),+
  305.         $(IOBaseAddrValue)))
  306.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  307.     ui start "InputDlg"
  308.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  309.                 set IRQValue = $(Combo1Out)
  310.                 set IOBaseAddress = $(Combo2Out)
  311.                 ui pop 1
  312.     else-ifstr(i) $(DLGEVENT) == "BACK"
  313.                 set CommonStatus = STATUS_USERCANCEL
  314.                 Debug-Output "Action: exit. Bye."
  315.                 ui pop 1
  316.                 goto end
  317.     else
  318.                 ui pop 1
  319.                 Debug-Output "Action: unknown. Bye."
  320.                 goto end
  321.     endif
  322.     set IOBaseAddrValue = *($(IOBaseAddrDecList), ~($(IOBaseAddrHexList),+
  323.         $(IOBaseAddress)))
  324.     ifstr(i) $(!STF_NCDETINFO) == {}
  325.         ifint $(PCMCIA) != 1
  326.             Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  327.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  328.                 Debug-Output "ShellCode error."
  329.                 goto ShellCodeError
  330.             endif
  331.             set BusInterfaceType = $($R1)
  332.             set BusNumber = $($R2)
  333.         else
  334.             set BusInterfaceType = 1
  335.             set BusNumber = 0
  336.         endif
  337.     else
  338.         set BusInterfaceType = *($(!STF_NCDETINFO),5)
  339.         set BusNumber = *($(!STF_NCDETINFO),6)
  340.     endif
  341. adapterverify =+
  342.     Ifstr(i) $(DetectedCard) != TRUE
  343.         Goto skipoptions
  344.     Endif
  345.     Debug-Output "OEMNADN2.INF: Calling Param_VerifyCard"
  346.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  347.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  348.         Debug-Output "OEMNADN2.INF: Param_VerifyCard succeeded"
  349.         Goto skipoptions
  350.     Endif
  351.     Set from = adapteroptions
  352.     Set to = skipoptions
  353.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  354.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  355.         Debug-Output "ShellCode error: cannot get an error string."
  356.         goto ShellCodeError
  357.     endif
  358.     set Error = $($R0)
  359.     Goto Warning
  360. skipoptions =+
  361.     ifint $(OldVersionExisted) == $(TRUE)
  362.         ifstr(i) $(!NTN_InstallMode) == configure
  363.                 goto writeparameters
  364.         endif
  365.     endif
  366.     StartWait
  367.     ifint $(OldVersionExisted) == $(FALSE)
  368.         ifstr(i) $(!NTN_InstallMode) == "install"
  369.                 Ifstr(i) $(DoCopy) == "YES"
  370.                     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  371.                     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  372.                         Goto ShellCodeError
  373.                     Else-Ifstr(i) $($R0) == STATUS_FAILED
  374.                         Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  375.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  376.                            goto ShellCodeError
  377.                         endif
  378.                         set Error = $($R0)
  379.                         Goto fatal
  380.                     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  381.                         Goto successful
  382.                     Endif
  383.                     Set SrcDir = $($R1)
  384.                 Endif
  385.                 install "Install-Option"
  386.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  387.                     Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  388.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  389.                         goto ShellCodeError
  390.                     endif
  391.                     set Error = $($R0)
  392.                     goto fatal
  393.                 endif
  394.         endif
  395.        Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  396.                         $(ProductSoftwareName), +
  397.                         $(ProductSoftwareName), +
  398.                         $(ProductSoftware$(Option)Title), $(STF_CONTEXTINFNAME), +
  399.                         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  400.                         $(NetEventDLL)
  401.        Set OEM_ABANDON_SOFTWARE = TRUE
  402.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  403.         Debug-Output "ShellCode error"
  404.         goto ShellCodeError
  405.        endif
  406.        set RegistryErrorIndex = $($R0)
  407.        set KeyProduct      = $($R1)
  408.        Set SoftNetRulesKey = $($R2)
  409.        CloseRegKey $($R3)
  410.        CloseRegKey $($R4)
  411.        CloseRegKey $($R5)
  412.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  413.         EndWait
  414.         Debug-Output "Registry error: add software components"
  415.         CloseRegKey $(KeyProduct)
  416.         CloseRegKey $(SoftNetRulesKey)
  417.         goto fatalregistry
  418.        endif
  419.        set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  420.                    {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  421.                    {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  422.                    {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Title)},+
  423.                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Description)},+
  424.                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  425.                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  426.        Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  427.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  428.         Debug-Output "ShellCode error."
  429.         goto ShellCodeError
  430.        endif
  431.        set RegistryErrorIndex = $($R0)
  432.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  433.         EndWait
  434.         Debug-Output "Registry error: add value list."
  435.         CloseRegKey $(KeyProduct)
  436.         CloseRegKey $(SoftNetRulesKey)
  437.         goto fatalregistry
  438.        endif
  439.        set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  440.                         {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  441.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  442.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  443.                         {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  444.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  445.        Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  446.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  447.         Debug-Output "ShellCode error."
  448.         goto ShellCodeError
  449.        endif
  450.        set RegistryErrorIndex = $($R0)
  451.        CloseRegKey $(KeyProduct)
  452.        CloseRegKey $(SoftNetRulesKey)
  453.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  454.         EndWait
  455.         Debug-Output "Resgitry error: add value list."
  456.         goto fatalregistry
  457.        endif
  458.     endif
  459.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  460.     ifint $($R4) != -1
  461.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  462.     endif
  463.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  464.                 Debug-Output "Cannot add hardware component"
  465.                 goto ShellCodeError
  466.     endif
  467.     set RegistryErrorIndex = $($R0)
  468.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  469.                 EndWait
  470.                 Debug-Output "Registry error: add hardware component"
  471.                 CloseRegKey $($R1)
  472.                 CloseRegKey $($R2)
  473.                 CloseRegKey $($R3)
  474.                 goto fatalregistry
  475.     endif
  476.     set KeyParameters = $($R3)
  477.     set KeyAdapterRules = $($R2)
  478.     set AdapterNumber = $($R4)
  479.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  480.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  481.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  482.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  483.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  484.                        {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  485.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  486.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  487.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  488.                 Debug-Output "ShellCode error"
  489.                 goto ShellCodeError
  490.     endif
  491.     CloseRegKey $($R1)
  492.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  493.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  494.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  495.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  496.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  497.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  498.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  499.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  500.                 Debug-Output "ShellCode error."
  501.                 goto ShellCodeError
  502.     endif
  503.     set RegistryErrorIndex = $($R0)
  504.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  505.                 EndWait
  506.                 Debug-Output "Resgitry error: add value list."
  507.                 CloseRegKey $(KeyParameters)
  508.                 CloseRegKey $(KeyAdapterRules)
  509.                 goto fatalregistry
  510.     endif
  511.     CloseRegKey $(KeyAdapterRules)
  512.     goto writeparameters
  513. writeparameters = +
  514.     ifint $(BusInterfaceType) == 8
  515.         set PCMCIA = 1
  516.         set BusInterfaceType = 1
  517.     endif
  518.     set NewValueList = {{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  519.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  520.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  521.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  522.                        {CardType,$(NoTitle),$(!REG_VT_DWORD),0},+
  523.                        {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
  524.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  525.     ifint $(PCMCIA) == 1
  526.         set NewValueList = {{Pcmcia,$(NoTitle),$(!REG_VT_DWORD),1}}
  527.         Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  528.     else
  529.         DeleteRegValue $(KeyParameters) "Pcmcia"
  530.     endif
  531.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  532.         Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  533.     endif
  534.     CloseRegKey $(KeyParameters)
  535.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  536.                 Debug-Output "ShellCode error."
  537.                 goto ShellCodeError
  538.     endif
  539.     set RegistryErrorIndex = $($R0)
  540.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  541.                 Debug-Output "Registry error: Add value list"
  542.                 goto fatalregistry
  543.     endif
  544.     EndWait
  545.     goto successful
  546. bindingadapter =+
  547.     set Error = "Binding: Sorry, not yet implemented."
  548.     goto fatal
  549. removeadapter = +
  550.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  551.                 Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  552.                                 $(ProductSoftwareName)
  553.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  554.                                 Debug-Output "ShellCode error"
  555.                                 goto ShellCodeError
  556.                 endif
  557.                 set RegistryErrorIndex = $($R0)
  558.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  559.                                 goto fatalregistry
  560.                 endif
  561.     else
  562.                 Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  563.                         $(ProductSoftwareName), $(!NTN_RegBase)
  564.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  565.                                 Debug-Output "ShellCode error"
  566.                                 goto ShellCodeError
  567.                 endif
  568.                 set RegistryErrorIndex = $($R0)
  569.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  570.                                 goto fatalregistry
  571.                 endif
  572.     endif
  573.     goto end
  574. UpgradeSoftware = +
  575.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  576.     Ifstr $(KeyProduct) != $(KeyNull)
  577.         install "Install-Update"
  578.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  579.             goto fatal
  580.         endif
  581.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  582.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  583.         CloseRegKey $(KeyProduct)
  584.     else
  585.         goto fatalregistry
  586.     endif
  587.     set iSearch = 1
  588. nextnetcard = +
  589.     Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  590.     set KeyNetcard = $($R0)
  591.     set iSearch = $($R1)
  592.     Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  593.     Ifstr $(KeyNetcard) != $(KeyNull)
  594.         Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  595.         SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  596.         CloseRegKey $(KeyNetcard)
  597.         goto nextnetcard
  598.     Endif
  599.     goto end
  600. successful = +
  601.     goto end
  602. abandon = +
  603.     ForListDo $(OEM_ABANDON_OPTIONS)
  604.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  605.             $(ProductSoftwareName), $($)
  606.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  607.             Debug-Output "ShellCode error"
  608.             goto ShellCodeError
  609.         endif
  610.         set RegistryErrorIndex = $($R0)
  611.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  612.             goto fatalregistry
  613.         endif
  614.     EndForListDo
  615.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  616.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  617.             $(ProductSoftwareName), FALSE
  618.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  619.             Debug-Output "ShellCode error"
  620.             goto ShellCodeError
  621.         endif
  622.         set RegistryErrorIndex = $($R0)
  623.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  624.             goto fatalregistry
  625.         endif
  626.     endif
  627.     goto end
  628. warning = +
  629.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  630.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  631.         goto ShellCodeError
  632.     endif
  633.     ifstr(i) $($R1) == "OK"
  634.         goto $(to)
  635.     else-ifstr(i) $($R1) == "CANCEL"
  636.         goto $(from)
  637.     else
  638.         goto "end"
  639.     endif
  640. nonfatalinfo = +
  641.     Set CommonStatus = STATUS_USERCANCEL
  642.     Set Severity = STATUS
  643.     goto nonfatalmsg
  644. nonfatal = +
  645.     Set Severity = NONFATAL
  646.     goto nonfatalmsg
  647. nonfatalmsg = +
  648.     ifstr(i) $(Error) == ""
  649.         Set Severity = NONFATAL
  650.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  651.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  652.             goto ShellCodeError
  653.         endif
  654.         set Error = $($R0)
  655.     endif
  656.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  657.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  658.         goto ShellCodeError
  659.     endif
  660.     ifstr(i) $($R1) == "OK"
  661.         goto $(from)
  662.     else
  663.         goto "end"
  664.     endif
  665. fatalregistry = +
  666.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  667.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  668.         goto ShellCodeError
  669.     endif
  670.     set Error = $($R0)
  671.     goto fatal
  672. fataldetect = +
  673.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  674.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  675.         Debug-Output "ShellCode error: cannot get an error string."
  676.         goto ShellCodeError
  677.     endif
  678.     set Error = $($R0)
  679.     Goto fatal
  680. fatal = +
  681.     ifstr(i) $(Error) == ""
  682.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  683.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  684.             goto ShellCodeError
  685.         endif
  686.         set Error = $($R0)
  687.     endif
  688.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  689.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  690.         goto ShellCodeError
  691.     endif
  692.     goto setfailed
  693. ShellCodeError = +
  694.     set DlgType      = "MessageBox"
  695.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  696.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  697.     set STF_MB_TYPE  = 1
  698.     set STF_MB_ICON  = 3
  699.     set STF_MB_DEF   = 1
  700.     ui start "Error Message"
  701.     goto setfailed
  702. setfailed = +
  703.     set CommonStatus = STATUS_FAILED
  704.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  705.         set OEM_ABANDON_ON = FALSE
  706.         goto abandon
  707.     endif
  708.     goto end
  709. end = +
  710.     goto term
  711. term = +
  712.     Return $(CommonStatus)
  713. [Install-Option]
  714.     set STF_VITAL = ""
  715.     ifstr(i) $(AddCopy) == "YES"
  716.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  717.     endif
  718.     ifstr(i) $(DoCopy) == "YES"
  719.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  720.        CopyFilesInCopyList
  721.     endif
  722.     ifstr(i) $(DoConfig) == "YES"
  723.     endif
  724.     Exit
  725. [Install-Update]
  726.    set STF_VITAL        = ""
  727.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  728.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  729.    exit
  730. [Source Media Descriptions]
  731.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  732. [Signature]
  733.     FileType = MICROSOFT_FILE
  734. [GetSignature]
  735.     read-syms Signature
  736.     return $(FileType)
  737. [ProductType]
  738. STF_PRODUCT  = LanmanNT
  739. STF_PLATFORM = I386
  740. [Files-Inf]
  741. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  742. [Files-NE2000]
  743. 1,NE2000.SYS , SIZE=999
  744. [Files-NE2000PCMCIA]
  745. 1,NE2000.SYS , SIZE=999
  746. [Files-NE2000SOCKETEA]
  747. 1,NE2000.SYS , SIZE=999
  748. [LanguagesSupported]
  749.     ENG
  750. [OptionsTextENG]
  751.     NE2000              = "Novell NE2000 Compatible Adapter"
  752.     NE2000SOCKETEA      = "Novell NE2000 Socket EA Adapter"
  753. [FileConstantsENG]
  754. ProCaption   = "Windows NT Setup"
  755. ProCancel    = "Cancel"
  756. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  757.                "Are you sure you want to cancel copying files?"
  758. ProCancelCap = "Network Setup Message"
  759. ProText1     = "Copying:"
  760. ProText2     = "To:"
  761. FunctionTitleNE2000   = "Novell NE2000 Compatible Network Card Setup"
  762. FunctionTitleNE2000SOCKETEA   = "Novell NE2000 Socket EA Network Card Setup"
  763. ProductSoftwareNE2000Description      = "Novell NE2000 Adapter Driver"
  764. ProductSoftwareNE2000SOCKETEADescription      = "Novell NE2000 Socket EA Adapter Driver"
  765. ProductHardwareNE2000Description        = "Novell NE2000 Adapter"
  766. ProductHardwareNE2000SOCKETEADescription        = "Novell NE2000 Socket EA Adapter"
  767. ProductSoftwareNE2000Title    = "Novell NE2000 Adapter Driver"
  768. ProductSoftwareNE2000SOCKETEATitle    = "Novell NE2000 Socket EA Adapter Driver"
  769. ProductHardwareNE2000Title      = "Novell NE2000 Adapter"
  770. ProductHardwareNE2000SOCKETEATitle      = "Novell NE2000 Socket EA Adapter"
  771. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  772. ShellCodeErrorText      = "Shell Code Error."
  773. [DialogConstantsENG]
  774. Help        = "&Help"
  775. Exit        = "Cancel"
  776. OK          = "OK"
  777. HelpContext = ""
  778. Continue    = "Continue"
  779. Cancel      = "Cancel"
  780. [FileDependentDlgENG]
  781. Label1 = "&IRQ Level:"
  782. Label2 = "I/O &Port Address:"
  783. DlgType = "RadioCombination"
  784. DlgTemplate = "NE2000"
  785. Caption =  $(FunctionTitle$(Option))
  786. Combo1List = $(IRQList)
  787. Combo1Out  = $(IRQValue)
  788. Combo2List = $(IOBaseAddrHexList)
  789. Combo2Out  = $(IOBaseAddress)
  790. ComboListItemsIn  = {Combo1List, Combo2List}
  791. ComboListItemsOut = {Combo1Out, Combo2Out}
  792. EditTextIn = ""
  793. EditTextLim = ""
  794. CBOptionsGreyed = {}
  795. NotifyFields = {NO, NO}
  796. HelpContext = $(!IDH_DB_OEMNADN2_INS)
  797.